﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hallenberg.SmartClient.Interfaces
{
    public interface IEntityTranslator
    {
        bool CanTranslate(Type targetType, Type sourceType);
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "Prevents unnecessary casting in the client code.")]
        bool CanTranslate<TTarget, TSource>();
        object Translate(IEntityTranslatorService service, Type targetType, object source);
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "Prevents unnecessary casting in the client code.")]
        TTarget Translate<TTarget>(IEntityTranslatorService service, object source);
    }
}
